﻿using System;

namespace DMHelper.Shared
{
    public class RandomGenerator
    {
        private static Random _generator;
        private static Random Generator
        {
            get
            {
                if (_generator == null)
                {
                    _generator = new Random();
                    return _generator;
                }

                return _generator;
            }
        }

        public static int GenerateRandom(int die)
        {
            return Generator.Next(die);
        } 
    }
}